package com.glink.manage.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "center_menu", resultMap = "BaseResultMap")
public class MenuBean extends Model<MenuBean> {

    @ApiModelProperty(value = "菜单ID")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "菜单名")
    private String name;

    @ApiModelProperty(value = "菜单路径")
    private String uri;

    @ApiModelProperty(value = "上一级菜单id")
    private String pid;

    @ApiModelProperty(value = "资源类型:(字典MenuResourceType):01-菜单,02-按钮,03-页面快捷方式,04-首页小面板")
    private String type;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "键值标识")
    @TableField(value = "`key`")
    private String key;

    @ApiModelProperty(value = "资源排序索引")
    private int idx;

    @ApiModelProperty(value = "是否启用菜单,默认不启用,0-不启用,1-启用")
    private String isEnable;

    @ApiModelProperty(value = "是否在新页面打开,默认不打开,0-不打开,1-打开")
    private String isPage;

    @ApiModelProperty(value = "导航栏位置(0=无;1=顶部;2=左侧)")
    private String place = "2";

    @ApiModelProperty(value = "创建日期")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新日期")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;
}
